# import pandas as pd
# pd.set_option('display.unicode.east_asian_width',True)
# df=pd.read_excel('学生成绩表.xlsm')
# df['总成绩']=df.groupby({'语文':'总成绩','数学':'总成绩','英语':'总成绩','综合':'总成绩'},axis=1).agg('sum')
# df['排名']=df['总成绩'].rank(method='min',ascending=False)
# df.sort_values('排名',inplace=True,ignore_index=True)
# df1=pd.DataFrame()
# groups=df.groupby('排名')
# for group in groups:
#     df2=pd.DataFrame(group[1])
#     df2.sort_values('语文',ascending=False,inplace=True)
#     df1=pd.concat([df1,df2])
# df1=df1.reset_index(drop=True)
# print(df1)

import pandas as pd
pd.set_option('display.unicode.east_asian_width',True)
df=pd.read_excel('学生成绩表.xlsm')
df['总成绩']=df.sum(axis=1,numeric_only=True)
df['平均成绩']=df.mean(axis=1,numeric_only=True)
print(df)
print(df.describe())